<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>content</title>
    <link rel="stylesheet" type="text/css" href="../../easyui/themes/default/easyui.css" />
    <link rel="stylesheet" type="text/css" href="../../easyui/themes/icon.css" />
    <script type="text/javascript" src="../../js/jquery-latest.min.js"></script>
    <script type="text/javascript" src="../../js/index2.js"></script>
    <script type="text/javascript" src="../../easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="../../easyui/locale/easyui-lang-zh_CN.js"></script>
    <link rel="stylesheet" type="text/css" href="../../css/index.css" />
    <script type="text/javascript">
    	$(function(){setTableCssByClass('table-striped');});//初始表格样式
    	/*显示明细维护窗口*/
        function showOper(obj){

    		if('add' == obj){
    			$('#detailOperForm').form('load',row);
            	$('#dlg_oper').dialog('open');
            	return false;
        	}
            
            var row = $("#datagrid1").datagrid('getSelected');

            if(row){
                if('edit' == obj){
	            	$('#detailOperForm').form('load',row);
	            	$('#dlg_oper').dialog('open');
                }else{
                	$.messager.confirm('提示', '确定删除选择所选记录么?', function(r){
        				if (r){
        					$.messager.alert('提示','删除成功！');
        				}
        			});
                }
            }else{
				$.messager.alert('提示','请选择一条数据');
            }
        }
        
    	var toolbar = [{
 	    	text:'新增',
 	        iconCls:'icon-add',
 	        handler:function(){showOper('add');}
 	    },{
 	    	text:'修改',
 	        iconCls:'icon-edit',
 	        handler:function(){showOper('edit');}
 	    },{
 	    	text:'删除',
 	        iconCls:'icon-cut',
 	        handler:function(){showOper('del')}
 	    }];
 	    
    </script>
</head>
<body>
			 <form id="ff"> 
		    	<table cellpadding="0" cellspacing="0" class="table-striped">
		    		<tr>
		    			<td>井号：</td>
		    			<td><input name="jsontext1"/></td>
		    			<td>井型：</td>
		    			<td><select class="easyui-combobox" name="jsontext2" style="width: 150px;"><option></option><option>探井</option><option>开发井</option></td>
		    			<td>井别：</td>
		    			<td><input name="jsontext3"/></td>
		    		</tr>
		    		<tr>
		    			<td>甲方单位：</td>
		    			<td><input name="jsontext4"/></td>
		    			<td>服务项目：</td>
		    			<td><input name="jsontext5"/></td>
		    			<td>钻机编号：</td>
		    			<td><input name="jsontext6"/></td>
		    		</tr>
		    	</table>
		    </form>
		    
			<div style="">
				<div style="height: 40px;padding: 0px 10px 0px 0px;text-align: right;">
					<a href="javascript:void(0)" class="easyui-linkbutton" onclick="clearForm();">查询</a>
					<a href="javascript:void(0)" class="easyui-linkbutton" onclick="alert(this.innerText);clearForm();">重置</a>
				</div>
		    	<table class="easyui-datagrid" title="数据列表" style="height:330px"
		    			id="datagrid1"
		    			url="../../data/dr/datagrid_data1.json"
						data-options="singleSelect:true,checkOnSelect:true,collapsible:true,method:'get',toolbar:toolbar,pagination:true">
					<thead>
						<tr>
							<th data-options="field:'ck',checkbox:true"></th>
							<th data-options="field:'jsontext1',width:60">井号</th>
							<th data-options="field:'jsontext2',width:100">井别</th>
							<th data-options="field:'jsontext3',width:100">井型</th>
							<th data-options="field:'jsontext4',width:100">甲方单位</th>
							<th data-options="field:'jsontext5',width:150">服务项目</th>
							<th data-options="field:'jsontext6',width:150">钻机编号</th>
							<th data-options="field:'status',width:50">自</th>
							<th data-options="field:'status1',width:50">至</th>
							<th data-options="field:'status3',width:100">起钻井深</th>
							<th data-options="field:'status4',width:100">钻达深度</th>
							<th data-options="field:'status5',width:100">井眼扩大率</th>
						</tr>
					</thead>
				</table>
		    </div>
		    
	<!-- 新增、修改弹出窗口 -->		    
	<div id="dlg_oper" class="easyui-dialog" closed="true" draggable="false" title="明细维护" style="width:1000px;height:500px;padding:10px">
		<form id="detailOperForm" method="post">
			<table class="table-striped">
				<tr>
					<td>项目编号：</td>
					<td><input name="jsontext1"/></td>
					<td>接收单位：</td>
					<td><input name="jsontext2"/></td>
				</tr>
				<tr>
					<td>负责人：</td>
					<td><input name="jsontext3"/></td>
					<td>开始时间：</td>
					<td><input name="jsontext4"/></td>
				</tr>
				<tr>
					<td colspan="4" align="right">
						<a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-ok" onclick="$('#dlg_oper').dialog('close');">保存</a>
						<a href="javascript:void(0);" class="easyui-linkbutton" iconCls="icon-cancel" onclick="$('#dlg_oper').dialog('close');">取消</a>
					</td>
				</tr>
			</table>
		</form>
	</div>
</body>
</html>